<?php
require_once '../../classes/includeAll_Layer2.php';

//$sessionId = 5; //debug
//$isAdmin=true;
$vlanID  = filter_input(INPUT_POST,"vlanID");
$switchID = filter_input(INPUT_POST,"switchID");
if($switchID == null || $switchID == false || $vlanID == null || $vlanID == false|| !$isAdmin)
{
  echo "false";
  exit();
}
require '../../resources/getConnection.php';
$cSwitch= new ConfigSwitch($switchID, $connection);
$configClass->EntryExistsOrCreate ("OutOfSwitchSync", 1);

if($cSwitch->removeVlan($vlanID))
  echo "true";
else
  echo "false";


